<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品详情页</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/base.css">
    <link rel="stylesheet" href="css/shop.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/animation.js"></script>
    <script src="js/index.js"></script>
</head>

<body>
    <div>
        <div class="head clearfix">
            <div class="logo">
                <img src="img/logo.png" alt="">
            </div>
            <div class="ind"><a href="show.do">首页</a></div>


            <div class="serch">
                <form action="show.do" method="post">
                    <input type="text" placeholder="搜索关键字" name="name">
                    <button>提交</button>
                </form>
            </div>
            <div class="cen">
                <a href="center.jsp">个人中心</a>
            </div>

        </div>
        <div class="bd">
            <div class="w clearfix">
                <div style="margin-left: 100px;">
                    <div class="focus">
                        <a href="#" class="arrow-l">&lt;</a>
                        <a href="javascript:;" class="arrow-r">&gt;</a>
                        <ul class="clearfix">
                            <c:if test="${pet.pics1!=''}"><li class="ig"><img src="upload/${pet.pics1 }" alt=""></li></c:if>
                            <c:if test="${pet.pics2!=''}"><li class="ig"><img src="upload/${pet.pics2 }" alt=""></li></c:if>
                            <c:if test="${pet.pics3!=''}"><li class="ig"> <img src="upload/${pet.pics3 }" alt=""></li></c:if>
                            <c:if test="${pet.pics4!=''}"><li class="ig"> <img src="upload/${pet.pics4 }" alt=""></li></c:if>
                            <c:if test="${pet.pics5!=''}"><li class="ig"> <img src="upload/${pet.pics5 }" alt=""></li></c:if>
                        </ul>
                        <ol class="circle">

                        </ol>
                    </div>
                    <div style="float:left; margin-left:50px ; height: 500px;width: 500px; position: relative; ">
                        <h1>${pet.title}</h1>
                        <div style="margin-top: 20px;">
                            <c:if test="${pet.sex!=null}"><p>sex:${pet.sex}</p></c:if>
                            <c:if test="${pet.age!=null}"><p>age:${pet.age}</p></c:if>
                            <c:if test="${pet.size!=null}"><p>size:${pet.size}</p></c:if>
                            <c:if test="${pet.price!=null}"><p>price:${pet.price}</p></c:if>
                            <c:if test="${pet.color!=null}"><p>color:${pet.color}</p></c:if>
                        </div>
                        <button id="car"><a href="shop.do?id=${pet.id}">加入购物车</a></button>
                    </div>
                </div>
            </div>
        </div>
        <!-- 加入购物车 -->
        <!-- <div class="mask"></div> -->
        <div class="add">
            <h1>"提示"</h1>
            <div class="add_a">
                <span>已成功将商品加入购物车!</span>
                <p>
                    <a href="show.do?flag=true"><span id="cut">查看购物车</span></a>
                </p>
            </div>

            <div class="add_b">3秒钟后自动屏蔽</div>
        </div>
        <!-- 结算 -->
        <div class="container">
            <div class="settle">
                <h1>购物车</h1>
                <form action="#">
                    <table class="table table-hover">
                        <!-- On rows -->
                        <tr>

                            <td>id</td>
                            <td>商品名</td>
                            <td>单价</td>
                            <td>是否出货</td>
                            <td><a href="#" class="checkAll">全删</a></td>
                        </tr>
                        <tr>

                            <td>1</td>
                            <td>小狗</td>
                            <td>100元</td>
                            <td>出货</td>
                            <td><a href="#" class="check">删除</a></td>
                        </tr>
                        <tr>

                            <td>2</td>
                            <td>小狗</td>
                            <td>100元</td>
                            <td>出货</td>
                            <td><a href="#" class="check">删除</a></td>
                        </tr>
                        <!-- <h1>没有商品</h1> -->
                    </table>
                    <button id="del">取消</button>
                    <span>共计:<i></i>元</span>
                    <button>结算</button>
                </form>
            </div>
        </div>
    </div>
    <div class="mask"></div>
    <div class="mask1"></div>
    <script>
        $(".serch input").focus(function () {
            $(".serch input").css("borderColor", "red");
        })
        $(".serch input").blur(function () {
            $(".serch input").css("borderColor", "#fff");
        })
        $(".mask").fadeOut(0);
        $(".add").fadeOut(0);
        var time;
        $("#car").click(function () {
            $(".add").fadeIn(1000);
            $(".mask").fadeIn(1000);
            clearInterval(time);
            time = setInterval(function () {
                $(".mask").fadeOut();
                $(".add").fadeOut();
            }, 3000);

        })
        $(".settle").fadeOut(0);
        $(".mask1").fadeOut(0);
        $("#shopcar,#cut").click(function () {
            $(".settle").fadeIn(1000);
            $(".mask1").fadeIn(1000);

        })
        $("#del").click(function () {
            $(".settle").fadeOut(1000);
            $(".mask1").fadeOut(1000);
        })
    </script>
</body>

</html>